package com.hongkou.tvstation.common.utils;

import java.util.HashSet;
import java.util.Set;

public class StringUtils {
	public static final String empty = "";

	public static String convertToEmpty(String param) {
		if (param == null)
			return empty;
		return param;
	}

	public static String[] distinctStringValue(String... params) {
		Set<String> sets = new HashSet<String>();
		for (String param : params) {
			if (param != null && !"".equals(param.trim()))
				sets.add(param.trim());
		}
		return (String[]) sets.toArray(new String[sets.size()]);
	}

	public static boolean isNullOrEmpty(String param) {
		if (param == null || "".equals(param))
			return true;
		return false;
	}
}
